﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameEngine.Scenes;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using GameEngine.animations;
using Imaginarium.jobs.skills;
using Imaginarium.team;
using Imaginarium.stats;
using Imaginarium.effect;
using Imaginarium.battleSistem;
using Imaginarium.jobs;
using Microsoft.Xna.Framework;
namespace Imaginarium
{
    public static class CodeParameters
    {
        #region AnimationParameters
        public static string StandMeleeAnimationName = "StandMelee";
        public static string StandRangeAnimationName = "StandRange";
        public static string StandMagicAnimationName = "StandMagic";
        public static string MeleeAttackAnimationName = "AttackMelee";
        public static string RangeAttackAnimationName = "AttackRange";
        public static string MagicAttackAnimationName = "AttackMagic";
        public static string DyingAnimationName = "Dying";
        #endregion
        #region TeamParameters
        public static float initCharAggro = 10;
        public static float baseExpPerLevelMultiplier = 0.1f;
        public static float jobExpPerLevelMultiplier = 0.1f;
        #endregion
        #region BattleParameters
        public static float battleMarginUp = 150.0f;
        public static float battleMarginDown = 200.0f;
        public static string battleCommandFont = "BattleCommandFont";
        public static string selectSkillFont = "BattleCommandFont";
        public static string battleInfoFont = "BattleCommandFont";
        public static string battleResultFont = "BattleCommandFont";
        public static string gameOverFont = "BattleCommandFont";
        public static string deadText = "(Dead)";
        public static string notEnoughMP = "Not enough mp";
        #endregion

        public static Hashtable skillsCreated = new Hashtable();
        public static Hashtable charactersCreated = new Hashtable();
        public static Hashtable animationsCreated = new Hashtable();
        public static Hashtable jobsCreated = new Hashtable();

        
        #region HardcodedMethods
        
        #region ImpRelated
        public enum ImpType { blue, green, mud }
        private static Animation getImpAnim(ImpType impType)
        {
            ContentManager cm = ImaginariumGame.getInstance().Content;
            Animation impAnim;
            switch (impType)
            {
                case ImpType.blue:
                    if (animationsCreated["blueImp"] == null)
                        animationsCreated.Add("blueImp", new Animation(cm.Load<Texture2D>("blueImp"), 3, 9, 27));
                    impAnim = (Animation)animationsCreated["blueImp"];
                    break;
                case ImpType.green:
                    if (animationsCreated["greenImp"] == null)
                        animationsCreated.Add("greenImp", new Animation(cm.Load<Texture2D>("greenImp"), 3, 9, 27));
                    impAnim = (Animation)animationsCreated["greenImp"];
                    break;
                case ImpType.mud:
                    if (animationsCreated["mudImp"] == null)
                        animationsCreated.Add("mudImp", new Animation(cm.Load<Texture2D>("mudImp"), 3, 9, 27));
                    impAnim = (Animation)animationsCreated["mudImp"];
                    break;
                default:
                    impAnim = null;
                    break;
            }
            return impAnim;
        }
        public static DetailAnimationCharacter createImpAnim(Character character, ImpType impType) {
            Animation impAnim = getImpAnim(impType);
            DetailAnimationCharacter impWalkDown = new DetailAnimationCharacter(character,"WalkDown",impAnim, 200, CharacterAnimations.WALK_DOWN);
            return impWalkDown;
        }
        public static DetailAnimationCharacter createImpAnimAttacking(Character character, ImpType impType)
        {
            Animation impAnim = getImpAnim(impType);
            DetailAnimationCharacter impAttacking = new DetailAnimationCharacter(character, "Attacking", impAnim, 200, CharacterAnimations.ATTACK);
            return impAttacking;
        }
        public static DetailAnimationCharacter createImpAnimDying(Character character, ImpType impType) 
        {
            ContentManager cm = ImaginariumGame.getInstance().Content;
            Animation impAnimDying;
            switch (impType)
            {
                case ImpType.blue:
                    if (animationsCreated["blueImpDying"] == null)
                        animationsCreated.Add("blueImpDying", new Animation(cm.Load<Texture2D>("blueImp"), 3, 9, 27));
                    impAnimDying = (Animation)animationsCreated["blueImpDying"];
                    break;
                case ImpType.green:
                    if (animationsCreated["greenImpDying"] == null)
                        animationsCreated.Add("greenImpDying", new Animation(cm.Load<Texture2D>("greenImp"), 3, 9, 27));
                    impAnimDying = (Animation)animationsCreated["greenImpDying"];
                    break;
                case ImpType.mud:
                    if (animationsCreated["mudImpDying"] == null)
                        animationsCreated.Add("mudImpDying", new Animation(cm.Load<Texture2D>("mudImp"), 3, 9, 27));
                    impAnimDying = (Animation)animationsCreated["mudImpDying"];
                    break;
                default:
                    impAnimDying = null;
                    break;
            }
            Microsoft.Xna.Framework.Graphics.Effect effect = cm.Load<Microsoft.Xna.Framework.Graphics.Effect>("Effects");
            impAnimDying.postProcessEffect = new PostProcessEffect("Dissapearing",effect,effect.Techniques["Disappear"]);
            DetailAnimationCharacter impDying = new DetailAnimationCharacter(character, DyingAnimationName , impAnimDying, 200, CharacterAnimations.WALK_DOWN);
            return impDying;
        }
        public static Skill getWater() {
            Skill water = (Skill)skillsCreated["Water"];
            if (water == null) {
                Elemental waterElemental = new Elemental();
                waterElemental.water = 1.0f;
                Imaginarium.effect.Effect waterEffect = new InstantEffect();
                waterEffect.kind = KindState.Bad;
                BaseDamage waterBaseDamage = new BaseDamage();
                waterBaseDamage.aoe = 0;
                waterBaseDamage.damage = 65;
                waterBaseDamage.isMagic = true;
                waterBaseDamage.elementalDamage = waterElemental;
                BaseDamage waterIncBaseDamage = new BaseDamage();
                waterIncBaseDamage.damage = 10;
                water = new Skill();
                water.idSkill = 1;
                water.name = "Water";
                water.description = "Cast a low level water magic spell on target enemy";
                water.mpConsume = 10;
                water.baseDamage = waterBaseDamage;
                water.incrementalDamage = waterIncBaseDamage;
                water.effect = waterEffect;
                skillsCreated.Add("Water", water);
            }
            return water;
        }
        public static Skill getWind()
        {
            Skill wind = (Skill)skillsCreated["Wind"];
            if (wind == null)
            {
                Elemental windElemental = new Elemental();
                windElemental.wind = 1.0f;
                Imaginarium.effect.Effect windEffect = new InstantEffect();
                windEffect.kind = KindState.Bad;
                BaseDamage windBaseDamage = new BaseDamage();
                windBaseDamage.aoe = 0;
                windBaseDamage.damage = 65;
                windBaseDamage.isMagic = true;
                windBaseDamage.elementalDamage = windElemental; 
                BaseDamage windIncBaseDamage = new BaseDamage();
                windIncBaseDamage.damage = 10;
                wind = new Skill();
                wind.idSkill = 2;
                wind.name = "Wind";
                wind.description = "Cast a low level wind magic spell on target enemy";
                wind.mpConsume = 10;
                wind.baseDamage = windBaseDamage;
                wind.incrementalDamage = windIncBaseDamage;
                wind.effect = windEffect;
                skillsCreated.Add("Wind", wind);
            }
            return wind;
        }
        public static Skill getFire()
        {
            Skill fire = (Skill)skillsCreated["Fire"];
            if (fire == null)
            {
                Elemental fireElemental = new Elemental();
                fireElemental.fire = 1.0f;
                Imaginarium.effect.Effect fireEffect = new InstantEffect();
                fireEffect.kind = KindState.Bad;
                BaseDamage fireBaseDamage = new BaseDamage();
                BaseDamage fireIncBaseDamage = new BaseDamage();
                fireIncBaseDamage.damage = 10;
                fireBaseDamage.aoe = 0;
                fireBaseDamage.damage= 65;
                fireBaseDamage.isMagic = true;
                fireBaseDamage.elementalDamage = fireElemental;
                fire = new Skill();
                fire.idSkill = 3;
                fire.name = "Fire";
                fire.description = "Cast a low level fire magic spell on target enemy";
                fire.mpConsume = 10;
                fire.baseDamage = fireBaseDamage;
                fire.incrementalDamage = fireIncBaseDamage;
                fire.effect = fireEffect;
                skillsCreated.Add("Fire", fire);
            }
            return fire;
        }
        public static Stats createImpStats(ImpType impType) 
        {
            Stats newStats = new Stats();
            newStats.agility = 6;
            newStats.strength = 8;
            newStats.dexterity = 10;
            newStats.intelligence = 4;
            newStats.maxHP = 150;
            newStats.maxMP = 70;
            newStats.attk = 65;
            newStats.mattk = 25;
            newStats.def = 20;
            newStats.mdef = 5;
            newStats.hit = 20;
            newStats.dodge = 15;
            switch (impType) 
            { 
                case ImpType.blue:
                    newStats.defElemental = new Elemental(0,1,0,0,true);
                    newStats.def += 30;
                    break;
                case ImpType.green:
                    newStats.defElemental = new Elemental(0, 0, 1, 0, true);
                    newStats.attk += 30;
                    newStats.dodge += 30;
                    newStats.agility += 3;
                    break;
                case ImpType.mud:
                    newStats.defElemental = new Elemental(1, 0, 0, 0, true);
                    newStats.mattk += 30;
                    newStats.maxHP += 100;
                    newStats.agility -= 3;
                    break;
            }
            newStats.isPercentage = false;
            return newStats;
        }
        public static float impScale = 3;
        public static int impBaseExpDropped = 10;
        public static int impJobExpDropped = 5;
        
        
        public static Enemy getImpBlue() {
            Enemy impBlue = (Enemy)charactersCreated["ImpBlue"];
            if (impBlue == null)
            {
                impBlue = new Enemy(); 
                DetailAnimation impBlueAnim = createImpAnim(impBlue, ImpType.blue);
                DetailAnimation impBlueAnimAttacking = createImpAnimAttacking(impBlue, ImpType.blue);
                DetailAnimation impBlueAnimDying = createImpAnimDying(impBlue, ImpType.blue);
                SkillDetail waterLvl1 = new SkillDetail(getWater(), 1),
                    windLvl1 = new SkillDetail(getWind(), 2),
                    fireLvl1 = new SkillDetail(getFire(), 3),
                    waterLvl5 = new SkillDetail(getWater(), 4),
                    windLvl5 = new SkillDetail(getWind(), 5),
                    fireLvl5 = new SkillDetail(getFire(), 6);
                impBlue.idCharacter = 51;
                impBlue.level = 5;
                impBlue.baseExpDropped = impBaseExpDropped;
                impBlue.jobExpDropped = impJobExpDropped;
                impBlue.name = "ImpBlue";
                impBlue.skillDetails.Add(waterLvl1);
                impBlue.skillDetails.Add(windLvl1);
                impBlue.skillDetails.Add(fireLvl1);
                impBlue.skillDetails.Add(waterLvl5);
                impBlue.skillDetails.Add(windLvl5);
                impBlue.skillDetails.Add(fireLvl5);
                impBlue.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Attack));
                impBlue.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Ability));
                impBlue.detailAnimations.Add(impBlueAnim);
                impBlue.detailAnimations.Add(impBlueAnimAttacking);
                impBlue.detailAnimations.Add(impBlueAnimDying);
                impBlue.scale = impScale;
                impBlue.stats = createImpStats(ImpType.blue);
                impBlue.hp = impBlue.stats.maxHP;
                impBlue.mp = impBlue.stats.maxMP;
                charactersCreated.Add("ImpBlue", impBlue);
            }
            return impBlue;
        }


        public static Enemy getImpGreen()
        {
            Enemy impGreen = (Enemy)charactersCreated["ImpGreen"];
            if (impGreen == null)
            {
                impGreen = new Enemy();
                DetailAnimation impGreenAnim = createImpAnim(impGreen, ImpType.green);
                DetailAnimation impGreenAnimAttacking = createImpAnimAttacking(impGreen, ImpType.green);
                DetailAnimation impGreenAnimDying = createImpAnimDying(impGreen, ImpType.green);
                SkillDetail windLvl1 = new SkillDetail(getWind(), 1);
                impGreen.idCharacter = 52;
                impGreen.level = 10;
                impGreen.baseExpDropped = impBaseExpDropped;
                impGreen.jobExpDropped = impJobExpDropped;
                impGreen.name = "ImpGreen";
                impGreen.skillDetails.Add(windLvl1);
                impGreen.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Attack));
                impGreen.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Ability));
                impGreen.detailAnimations.Add(impGreenAnim);
                impGreen.detailAnimations.Add(impGreenAnimAttacking);
                impGreen.detailAnimations.Add(impGreenAnimDying);
                impGreen.scale = impScale;
                impGreen.stats = createImpStats(ImpType.green);
                impGreen.hp = impGreen.stats.maxHP;
                impGreen.mp = impGreen.stats.maxMP;
                charactersCreated.Add("ImpGreen", impGreen);
            }
            return impGreen;
        }
        public static Enemy getImpMud() {
            Enemy impMud = (Enemy)charactersCreated["ImpMud"];
            if (impMud == null)
            {
                impMud = new Enemy();
                DetailAnimation impMudAnim = createImpAnim(impMud, ImpType.mud);
                DetailAnimation impMudAnimAttacking = createImpAnimAttacking(impMud, ImpType.mud);
                DetailAnimation impMudAnimDying = createImpAnimDying(impMud, ImpType.mud);
                SkillDetail fireLvl1 = new SkillDetail(getFire(), 1);
                impMud.idCharacter = 53;
                impMud.level = 15;
                impMud.baseExpDropped = impBaseExpDropped;
                impMud.jobExpDropped = impJobExpDropped;
                impMud.name = "ImpMud";
                impMud.skillDetails.Add(fireLvl1);
                impMud.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Attack));
                impMud.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Ability));
                impMud.detailAnimations.Add(impMudAnim);
                impMud.detailAnimations.Add(impMudAnimAttacking);
                impMud.detailAnimations.Add(impMudAnimDying);
                impMud.scale = impScale;
                impMud.stats = createImpStats(ImpType.mud);
                impMud.hp = impMud.stats.maxHP;
                impMud.mp = impMud.stats.maxMP;
                charactersCreated.Add("ImpMud", impMud);
            }
            return impMud;
        }
        #endregion
        #region WarriorArcherRelated
        public static float warriorScale = 0.3f, archerScale = 0.3f;
        public static int warriorFrameDur = 500, archerFrameDur = 500;
        public static Vector2 warriorDrawOffset = new Vector2(0,-83), archerDrawOffset = warriorDrawOffset;
        public static Stats getWarriorIncPerLvl() 
        {
            Stats warriorIncPerLvl = new Stats();
            //TODO
            return warriorIncPerLvl;
        }
        public static Job getWarriorJob() 
        {
            Job warriorJob = (Job)jobsCreated["warrior"];
            if (warriorJob == null) 
            {
                warriorJob = new Job();
                warriorJob.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Attack));
                warriorJob.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Ability));
                warriorJob.idJob = 01;
                warriorJob.name = "WarriorJob";
                warriorJob.incPerLvl = getWarriorIncPerLvl();
                warriorJob.expConstant = 2;
                //warriorJob.skillList.Add(); todo
                jobsCreated.Add("warrior", warriorJob);
            }
            return warriorJob;
        }
        public static Stats createWarriorStats()
        {
            Stats newStats = new Stats();
            newStats.agility = 6;
            newStats.strength = 15;
            newStats.dexterity = 9;
            newStats.intelligence = 1;
            newStats.maxHP = 650;
            newStats.maxMP = 10;
            newStats.attk = 60;
            newStats.mattk = 5;
            newStats.def = 5;
            newStats.mdef = 1;
            newStats.hit = 30;
            newStats.dodge = 10;
            newStats.isPercentage = false;
            return newStats;
        }
        public static Player getWarrior() 
        {
            Player warrior = (Player)charactersCreated["Warrior"];
            if (warrior == null)
            {
                warrior = new Player();
                DetailAnimation warriorAnimStanding = createWarriorAnimStanding(warrior);
                DetailAnimation warriorAnimAttackingMelee = createWarriorAnimAttackingMelee(warrior);
                DetailAnimation warriorAnimAttackingMagic = createWarriorAnimAttackingMagic(warrior);
                DetailAnimation warriorAnimDying = createWarriorAnimDying(warrior);
                //SkillDetail fireLvl1 = new SkillDetail(getFire(), 1);
                warrior.idCharacter = 01;
                warrior.level = 1;
                warrior.name = "Warrior";
                warrior.drawingOffset = warriorDrawOffset;
                warrior.attackType = Character.TypeOfAttack.melee; //should not be needed
                Job warriorJob = getWarriorJob();
                DetailJob warriorDJ = new DetailJob(warriorJob);
                warriorDJ.jobExp = 50;
                warriorDJ.jobLevel = 2;
                warriorDJ.skillDetail.Add(new SkillDetail(getFire(),1));
                warriorDJ.skillPtsRemaining = 1;
                warrior.actualJobs.Add(warriorDJ);
                warrior.currentJob = warriorDJ;
                warrior.detailAnimations.Add(warriorAnimStanding);
                warrior.detailAnimations.Add(warriorAnimAttackingMelee);
                warrior.detailAnimations.Add(warriorAnimAttackingMagic);
                warrior.detailAnimations.Add(warriorAnimDying);
                warrior.scale = warriorScale;
                warrior.stats = createWarriorStats();
                warrior.hp = warrior.stats.maxHP;
                warrior.mp = warrior.stats.maxMP;
                charactersCreated.Add("Warrior", warrior);
            }
            return warrior;
        }
        public static Animation getWarriorAnim()
        {
            ContentManager cm = ImaginariumGame.getInstance().Content;
            if (animationsCreated["warrior"] == null)
                animationsCreated.Add("warrior", new Animation(cm.Load<Texture2D>("Caballero"), 3, 4, 10));
            return (Animation)animationsCreated["warrior"];
        }
        public static Animation getArcherAnim()
        {
            ContentManager cm = ImaginariumGame.getInstance().Content;
            if (animationsCreated["archer"] == null)
                animationsCreated.Add("archer", new Animation(cm.Load<Texture2D>("Archer"), 3, 4, 10));
            return (Animation)animationsCreated["archer"];
        }
        public static Animation getWeaponsAnim()
        {
            ContentManager cm = ImaginariumGame.getInstance().Content;
            if (animationsCreated["weapons"] == null)
                animationsCreated.Add("weapons", new Animation(cm.Load<Texture2D>("Armas"), 3, 3, 9));
            return (Animation)animationsCreated["weapons"];
        }
        public static DetailAnimation createWarriorAnimStanding(Character character)
        {
            Animation warriorAnim = getWarriorAnim(), weaponsAnim = getWeaponsAnim();
            List<Animation> childAnims = new List<Animation>();
            childAnims.Add(weaponsAnim);

            DetailAnimation warriorStanding = new DetailAnimationComposed(character, StandMeleeAnimationName, warriorAnim, childAnims, warriorFrameDur, 0, 0, true, false);
            return warriorStanding;
        }
        public static DetailAnimation createWarriorAnimAttackingMelee(Character character)
        {
            Animation warriorAnim = getWarriorAnim(), weaponsAnim = getWeaponsAnim();
            List<Animation> childAnims = new List<Animation>();
            childAnims.Add(weaponsAnim);

            DetailAnimation warriorAttackingMelee = new DetailAnimationComposed(character, MeleeAttackAnimationName, warriorAnim, childAnims, warriorFrameDur, 0, 2, true, false);
            warriorAttackingMelee.loopAnimation = false;
            return warriorAttackingMelee;
        }
        public static DetailAnimation createWarriorAnimAttackingMagic(Character character)
        {
            Animation warriorAnim = getWarriorAnim(), weaponsAnim = getWeaponsAnim();
            List<Animation> childAnims = new List<Animation>();
            childAnims.Add(weaponsAnim);

            DetailAnimation warriorAttackingMagic = new DetailAnimationComposed(character, MagicAttackAnimationName, warriorAnim, childAnims, warriorFrameDur, 6, 8, true, false);
            warriorAttackingMagic.loopAnimation = false;
            return warriorAttackingMagic;
        }
        public static DetailAnimation createWarriorAnimDying(Character character)
        {
            Animation warriorAnim = getWarriorAnim();
            DetailAnimation warriorDying = new DetailAnimation(character, DyingAnimationName, warriorAnim, warriorFrameDur, 9, 9, true, false);
            return warriorDying;
        }
        public static Stats getArcherIncPerLvl()
        {
            Stats archerIncPerLvl = new Stats();
            //TODO
            return archerIncPerLvl;
        }
        public static Job getArcherJob()
        {
            Job archerJob = (Job)jobsCreated["archer"];
            if (archerJob == null)
            {
                archerJob = new Job();
                archerJob.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Attack));
                archerJob.battleOptions.Add(new BattleOption(BattleOption.BattleOptionEnum.Ability));
                archerJob.idJob = 01;
                archerJob.name = "ArcherJob";
                archerJob.incPerLvl = getArcherIncPerLvl();
                archerJob.expConstant = 2;
                //archerJob.skillList.Add(); todo
                jobsCreated.Add("archer", archerJob);
            }
            return archerJob;
        }
        public static Stats createArcherStats()
        {
            Stats newStats = new Stats();
            newStats.agility = 6;
            newStats.strength = 15;
            newStats.dexterity = 9;
            newStats.intelligence = 1;
            newStats.maxHP = 650;
            newStats.maxMP = 10;
            newStats.attk = 60;
            newStats.mattk = 5;
            newStats.def = 5;
            newStats.mdef = 1;
            newStats.hit = 30;
            newStats.dodge = 10;
            newStats.isPercentage = false;
            return newStats;
        }
        public static Player getArcher()
        {
            Player archer = (Player)charactersCreated["Archer"];
            if (archer == null)
            {
                archer = new Player();
                DetailAnimation archerAnimStanding = createArcherAnimStanding(archer);
                DetailAnimation archerAnimAttackingRange = createArcherAnimAttackingRange(archer);
                DetailAnimation archerAnimAttackingMagic = createArcherAnimAttackingMagic(archer);
                DetailAnimation archerAnimDying = createArcherAnimDying(archer);
                //SkillDetail fireLvl1 = new SkillDetail(getFire(), 1);
                archer.idCharacter = 01;
                archer.level = 1;
                archer.name = "Archer";
                archer.drawingOffset = archerDrawOffset;
                Job archerJob = getArcherJob();
                DetailJob archerDJ = new DetailJob(archerJob);
                archerDJ.jobExp = 50;
                archerDJ.jobLevel = 2;
                archerDJ.skillDetail.Add(new SkillDetail(getWind(),1));
                archerDJ.skillPtsRemaining = 1;
                archer.actualJobs.Add(archerDJ);
                archer.currentJob = archerDJ;
                archer.attackType = Character.TypeOfAttack.range; //should not be needed
                archer.detailAnimations.Add(archerAnimStanding);
                archer.detailAnimations.Add(archerAnimAttackingRange);
                archer.detailAnimations.Add(archerAnimAttackingMagic);
                archer.detailAnimations.Add(archerAnimDying);
                archer.scale = archerScale;
                archer.stats = createArcherStats();
                archer.hp = archer.stats.maxHP;
                archer.mp = archer.stats.maxMP;
                charactersCreated.Add("Archer", archer);
            }
            return archer;
        }
        public static DetailAnimation createArcherAnimStanding(Character character)
        {
            Animation archerAnim = getArcherAnim(), weaponsAnim = getWeaponsAnim();
            List<Animation> childAnims = new List<Animation>();
            childAnims.Add(weaponsAnim);

            DetailAnimation archerStanding = new DetailAnimationComposed(character, StandRangeAnimationName, archerAnim, childAnims, archerFrameDur, 3, 3, true, false);
            return archerStanding;
        }
        public static DetailAnimation createArcherAnimAttackingRange(Character character)
        {
            Animation archerAnim = getArcherAnim(), weaponsAnim = getWeaponsAnim();
            List<Animation> childAnims = new List<Animation>();
            childAnims.Add(weaponsAnim);

            DetailAnimation archerAttackingRange = new DetailAnimationComposed(character, RangeAttackAnimationName, archerAnim, childAnims, archerFrameDur, 3, 5, true, false);
            archerAttackingRange.loopAnimation = false;
            return archerAttackingRange;
        }
        public static DetailAnimation createArcherAnimAttackingMagic(Character character)
        {
            Animation archerAnim = getArcherAnim(), weaponsAnim = getWeaponsAnim();
            List<Animation> childAnims = new List<Animation>();
            childAnims.Add(weaponsAnim);

            DetailAnimation archerAttackingMagic = new DetailAnimationComposed(character, MagicAttackAnimationName, archerAnim, childAnims, archerFrameDur, 6, 8, true, false);
            archerAttackingMagic.loopAnimation = false;
            return archerAttackingMagic;
        }
        public static DetailAnimation createArcherAnimDying(Character character)
        {
            Animation archerAnim = getArcherAnim();
            DetailAnimation archerDying = new DetailAnimation(character, DyingAnimationName, archerAnim, archerFrameDur, 9, 9, true, false);
            return archerDying;
        }
        #endregion
        public static List<Character> possibleEnemiesHardcoded()
        {

            Enemy impBlue = getImpBlue();
            Enemy impGreen = getImpGreen();
            Enemy impMud = getImpMud();

            List<Character> posibleEnemies = new List<Character>();
            posibleEnemies.Add(impBlue);posibleEnemies.Add(impGreen);posibleEnemies.Add(impMud);
            return posibleEnemies;
        }
        public static List<Character> possiblePlayersHardcoded()
        {
            Player warrior = getWarrior();
            Player archer = getArcher();

            List<Character> posiblePlayers = new List<Character>();
            posiblePlayers.Add(warrior);
            posiblePlayers.Add(archer);
            return posiblePlayers;
        }
        #endregion
    }
}
